package com.boboPlanet.dict.controller;

import com.boboPlanet.comm.entity.po.SysDictConfigPO;
import com.boboPlanet.comm.result.ResponseResult;
import com.boboPlanet.dict.service.BaseDictConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description: TODO
 * @Author: mis_wu
 * @Date: 2023/2/16
 **/
@RestController
@RequestMapping("/baseDictConfig")
@Api(tags = "基础字典配置",value = "基础字典配置")
public class BaseDictConfigController {

    @Resource
    private BaseDictConfigService baseDictConfigService;

    @GetMapping("/getOneDictConfigByCode")
    @ApiOperation("通过配置编码获取配置")
    public ResponseResult<SysDictConfigPO> getOneDictConfigByCode(@RequestParam String code){
        return ResponseResult.isSuccess(baseDictConfigService.queryBaseConfigByCode(code));
    }

}
